#ifndef UI_ELEMENT_NUMERIC_H__
#define UI_ELEMENT_NUMERIC_H__
#include "ProjectHeader.h"
#include "UIElement.h"

class UINumericElement : public UIElement
{
public:
	bool Draw(std::vector<vertex> * VBOVec, const std::map<int, texCoord2f>& texMap, GLuint currentTex);
	bool DrawForeground(std::vector<vertex> * VBOVec, const std::map<int, texCoord2f>& texMap, GLuint currentTex);
	bool DrawBackground(std::vector<vertex> * VBOVec, const std::map<int, texCoord2f>& texMap, GLuint currentTex);

	void SetNumericBackground(texCoord2f numericBackgroundTexture);
	void SetNumericPosition(vertex2f btmLft, vertex2f topRgt);
	void SetNumericTextures(const std::vector<texCoord2f> * numericTexture);
	void SetNumericMode(int numberOfDigits, bool isSigned = false, int base = 10);

private:
	std::vector<texCoord2f> _numericTextures;	//Holds the textures for each glyph. This should have base+2 elements, the last two being the signs + and - (in that order).
	texCoord2f _numericBackgroundTexture;		//Holds the texture for the background of the number display; visible through alpha on the glyphs

	int _numberOfDigits;	//Holds the number of digits to be displayed in the number display
	int _base;				//Holds the base of the number to be shown
	bool _isSigned;			//If true, the last digit is used to display the sign of the number

	vertex2f _iconBtmLft;	//Holds the bottom left corner of the number display, in element-relative units (0-1 goes from left or bottom of the element to top or right of the element)
	vertex2f _iconTopRgt;	//Holds the top right corner of the number display, in element-relative units (0-1 foes from left or bottom of the element to top or right of the element)	
};

#endif